package cn.itrip.controller;

import cn.itrip.beans.dto.Dto;
import cn.itrip.beans.vo.userinfo.ItripUserVO;
import cn.itrip.common.DtoUtil;
import io.swagger.annotations.*;
import org.springframework.context.annotation.Configuration;
import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.*;

/**
 * 用户注册类
 */
@Controller
@Api(value = "API",basePath = "/http://www.itrip.test.cn/auth/api")
@RequestMapping(value="/api")
public class UserController {

    /**
     * 使用邮箱注册
     * @param userVO
     * @return
     */
    @ApiOperation(value="使用邮箱注册",httpMethod = "POST",
            protocols = "HTTP", produces = "application/json",
            response = Dto.class,notes="使用邮箱注册 ")
    @RequestMapping(value="/doregister",method=RequestMethod.POST,produces = "application/json")
//    @ApiImplicitParams({
//            @ApiImplicitParam(name = "userVO",value = "用户的实体类",required =true )
//    })
    @ResponseBody
    public Dto doRegistter(@RequestBody ItripUserVO userVO){
        System.out.println("userVO.getUserCode(): "+userVO.getUserCode());
        System.out.println("userVO.getUserPassword(): "+userVO.getUserPassword());
        System.out.println("userVO.getUserName(): "+userVO.getUserName());
        return DtoUtil.returnSuccess();
    }
}
